<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateColumnRecommendDatasTable extends Migration
{

    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('column_recommend_datas', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 100)->nullable()->comment('推荐数据名称');
            $table->string('title', 100)->nullable()->comment('显示名称');
            $table->integer('data_id')->default(0)->unsigned()->comment('数据类型ID');
            $table->integer('resource_data_id')->default(0)->unsigned()->comment('数据ID');
            $table->string('onclick')->nullable()->comment('onclick事件');
            $table->string('img', 191)->nullable()->comment('图片');
            $table->integer('order')->default(0)->unsigned()->comment('排序');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('column_recommend_datas');
    }
}
